package com.nvc.homeplan;

import android.app.*;
import android.content.Intent;
import android.os.Bundle;
import android.view.*;
import android.widget.*;

public class ProjectPlanSearchPage  extends Activity 
{
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.project_plan_search_page); 
    }	

    public void optionCheckBoxClickHandler(View target) 
    {
    	HomePlanApplication application = (HomePlanApplication) getApplication();
    	application.searchType = "";
    	application.cfmswitch = 3;
    	CheckBox chkbox = null;
    	switch (target.getId())
    	{
    		case R.id.project_plan_search_page_checkbox_option2:
    			application.searchUrlQueryString = "ProjectType=41&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option2);
    			break;
    		case R.id.project_plan_search_page_checkbox_option3:
    			application.searchUrlQueryString = "ProjectType=45&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option3);
    			break;
    		case R.id.project_plan_search_page_checkbox_option4:
    			application.searchUrlQueryString = "ProjectType=39&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option4);
    			break;
    		case R.id.project_plan_search_page_checkbox_option5:
    			application.searchUrlQueryString = "ProjectType=40&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option5);
    			break;
    		case R.id.project_plan_search_page_checkbox_option6:
    			application.searchUrlQueryString = "ProjectType=44&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option6);
    			break;
    		case R.id.project_plan_search_page_checkbox_option7:
    			application.searchUrlQueryString = "ProjectType=51&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option7);
    			break;
    		case R.id.project_plan_search_page_checkbox_option8:
    			application.searchUrlQueryString = "ProjectType=42&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option8);
    			break;
    		case R.id.project_plan_search_page_checkbox_option9:
    			application.searchUrlQueryString = "ProjectType=43&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option9);
    			break;
    		case R.id.project_plan_search_page_checkbox_option10:
    			application.searchUrlQueryString = "ProjectType=54&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option10);
    			break;
    		case R.id.project_plan_search_page_checkbox_option11:
    			application.searchUrlQueryString = "ProjectType=46&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option11);
    			break;
    		case R.id.project_plan_search_page_checkbox_option12:
    			application.searchUrlQueryString = "ProjectType=52&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option12);
    			break;
    		case R.id.project_plan_search_page_checkbox_option13:
    			application.searchUrlQueryString = "ProjectType=47&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option13);
    			break;
    		case R.id.project_plan_search_page_checkbox_option14:
    			application.searchUrlQueryString = "ProjectType=55&action=10";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option14);
    			break;
    		case R.id.project_plan_search_page_checkbox_option15:
    			application.searchUrlQueryString = "ProjectType=62&action=10&vendor=78198";
    			chkbox = (CheckBox)findViewById(R.id.project_plan_search_page_checkbox_option15);
    			break;
    	}
        Intent intent = new Intent(Constants.INTENT_ACTION_PLAN_LIST_PAGE);
        startActivity(intent);
        chkbox.setChecked(false);
    }
}
